using System;
using System.Collections.Generic;
using System.Text;

using Pixysoft.Framework.XSchEmA.Aspect;
using Pixysoft.Framework.XSchEmA.Entity;

namespace Pixysoft.Framework.XSchEmA
{
    public interface ISqlBuilder
    {
        string CreateDatabase(string databasename);
        string DropDatabase(string databasename);

        string CreateTable(DatabaseSchema database, TableSchema table);
        string DropTable(TableSchema table);
        string DropTable(string tablename);

        string AlterTableCreateColumn(ColumnSchema column);
        string AlterTableDropColumn(ColumnSchema column);
        string AlterTableDropColumn(string tablename, string columnname);

        string AlterTableModifyColumn(ColumnSchema column);//NO NULLABLE SPECIFY
        string AlterTableModifyColumnNullable(ColumnSchema column);//NULLABLE SPECIFY

        string AlterTableCreateConstraint(PrimaryKeySchema pk);
        string AlterTableDropConstraint(PrimaryKeySchema pk);

        string AlterTableCreateConstraint(ForeignKeySchema fk);
        string AlterTableDropConstraint(ForeignKeySchema fk);

        string AlterTableCreateConstraint(UniqueSchema unique);
        string AlterTableDropConstraint(UniqueSchema unique);

        string AlterTableCreateIndex(IndexSchema index);
        string AlterTableDropIndex(IndexSchema index);

        string GetDataType(DataTypeSchema datatype);
    }
}
